package com.boarsoft.boar.batch.demo.biz;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.boarsoft.boar.batch.demo.entity.Demo1;
import com.boarsoft.hibernate.biz.SimpleBizImpl;

@Component
public class DemoBatchBizImpl extends SimpleBizImpl implements DemoBatchBiz {

	@Override
	@Transactional(readOnly = true)
	public List<Demo1> list(int limit) {
		return dao.list(Demo1.class, 1, limit);
	}

	@Override
	@Transactional
	public void save(List<Demo1> lt) {
		dao.batchSave(lt, 100);
	}
}
